package io.afu.validator.Annimation;

import io.afu.validator.Constant.MsgConstant;
import io.afu.validator.Implement.OnlyLetterNumberImpl;
import io.afu.validator.Implement.TimeValidatorImpl;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.ANNOTATION_TYPE,ElementType.FIELD,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {OnlyLetterNumberImpl.class})
public @interface OnlyLetterNumber {

    String message() default MsgConstant.TIMEDATE_FORMAT_NOT_VAILED;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default{};

    boolean allowEmpty() default false;

}
